#include "qdeviceinformationdialog.h"
#include "ui_qdeviceinformationdialog.h"

#include "qbaseitemdelegate.h"

#include <QHeaderView>

QDeviceInformationDialog::QDeviceInformationDialog(QWidget *parent) :
    QBaseDialog(parent),
    ui(new Ui::QDeviceInformationDialog)
{
    ui->setupUi(this);

    ui->treeWidget->header()->setMovable(false);
    ui->treeWidget->setItemDelegate(new QBaseItemDelegate);

    setProperty("panelwidget",true);
}

QDeviceInformationDialog::~QDeviceInformationDialog()
{
    delete ui;
}

void QDeviceInformationDialog::set_property(const QString &key, const QString &value)
{
    QTreeWidgetItem* item=new QTreeWidgetItem(ui->treeWidget);
    item->setText(0,key);
    item->setText(1,value);
    item->setToolTip(1,value);
}
